<cfparam name="homeTeamPlayers.recordCount" default="">
<cfparam name="awayTeamPlayers.recordCount" default="">

<cfoutput>

	#startFormTag(controller="playerresults", action="create")#
	
	<table class="nostyle">
		<tr>
			<td colspan="3" style="text-align:center">Home Team</td>
			<td colspan="3" style="text-align:center">Away Team</td>
		</tr>
		<tr>
			<th>No</th>
			<th>Player</th>
			<th></th>
			<th>No</th>
			<th>Player</th>

		</tr>
		<cfloop from="1" to="3" index="x">
		<!---<cfloop query="homeTeamPlayers" startrow="1" endrow="#homeTeamPlayers.recordCount#">--->
		#hiddenFieldTag(name='playerresult[#x#][fixtureid]', value=params.key)#
		#hiddenFieldTag(name='playerresult[#x#][seasonid]', value=params.seasonid)#
		#hiddenFieldTag(name='playerresult[#x#][created]', value=now())#
		#hiddenFieldTag(name='playerresult[#x#][homeplayerid]', value=homeTeamPlayers.PlayerID[x])#
		#hiddenFieldTag(name='playerresult[#x#][awayplayerid]', value=awayTeamPlayers.PlayerID[x])#
		<!---#hiddenFieldTag(name='playerresult[#x#][homeplayergames]', value=0)#
		#hiddenFieldTag(name='playerresult[#x#][awayplayergames]', value=0)#--->		
		<tr>
			<td>#homeTeamPlayers.Position[x]#</td>
		
			<td>
				#homeTeamPlayers.PlayerID[x]#
				
				#homeTeamPlayers.FirstName[x]#
				#homeTeamPlayers.LastName[x]#
			</td>
		
			<td>
				vs
			</td>
			<td>
				#awayTeamPlayers.Position[x]#
			</td>
			<td>
				#awayTeamPlayers.PlayerID[x]#		
				
				#awayTeamPlayers.FirstName[x]#
				#awayTeamPlayers.LastName[x]#
	 		</td>
		</tr>
		</cfloop>		
	</table>
		<p>
			<br />
			#submitTag(value="Generate",disable="Please wait...")#
		</p>
	#endFormTag()#
	<br /><br />
</cfoutput>